<%-- 
    Document   : empdept
    Created on : Jan 28, 2014, 10:47:53 PM
    Author     : zraj
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<style type="text/css">
            table.gridtable {
                font-family: verdana,arial,sans-serif;
                font-size:11px;
                color:#333333;
                border-width: 1px;
                border-color: #666666;
                border-collapse: collapse;
            }
            table.gridtable th {
                border-width: 1px;
                padding: 8px;
                border-style: solid;
                border-color: #666666;
                background-color: #dedede;
            }
            table.gridtable td {
                border-width: 1px;
                padding: 8px;
                border-style: solid;
                border-color: #666666;
                background-color: #ffffff;
            }
            .tb-header{
                font-weight: bold;
            }
        </style>
        <p style="width: 80%;text-align: center;margin: auto;">
<s:form id="form-search-empdept" action="searchEmpDept" method="post" theme="simple">

                                                                     <s:select 
                                                                            
                                                                            list="listDepartment" 
                                                                            name="searchDept" 
                                                                            listKey="departmentID"
                                                                            listValue="departmentName"
                                                                            headerKey="-1"
                                                                            headerValue="--เลือก--">
                                                                        </s:select>
                                                                     <s:submit value="ตกลง"></s:submit>
</s:form>
            <br/>
<s:if test="%{emps.size() > 0}">
    <table class="gridtable">
        <tr class="tb-header">
                   <th></th> <th>รหัสพนักงาน</th><th>ชื่อ - สกุล</th><th>ตำแหน่ง</th>
                </tr>
    <s:iterator value="emps" status="stat">
        <tr>
            <td><s:property value="#stat.index + 1" /></td>
            <td> <s:property value="empId"></s:property></td>
            <td><s:property value="nameTH"></s:property>   <s:property value="surnameTH"></s:property></td>
            <td> <s:property value="positionName"></s:property></td>
        </tr>
        
    </s:iterator>                                             
    </table>
    </p>
                                                                     </s:if>
                                                                     <s:if test="%{emps.size() == 0}">ไม่มีข้อมูล</s:if>